package net.hailxenu.stats;

import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockListener;
import org.bukkit.event.block.BlockPlaceEvent;

public class StatsBlocks extends BlockListener
{
    private XenuStats plugin;

    public StatsBlocks(XenuStats plugin)
    {
        this.plugin = plugin;
    }

    @Override
    public void onBlockBreak(BlockBreakEvent event)
    {
        plugin.getPlayerData(event.getPlayer()).qBLOCKS_DESTROYED++;
    }

    @Override
    public void onBlockPlace(BlockPlaceEvent event)
    {
        plugin.getPlayerData(event.getPlayer()).qBLOCKS_PLACED++;
    }
}
